// Very contrived example to demonstrate the use of function
// declarations.
#include <iostream>

int func1(int arg); // Declaration of func1
int func2(int arg); // Declaration of func2

// Now that we have declared func1 and func2 we can define them in any
// order.

// This is the definition for func1:
int func1(int arg)
{
  if(arg == 1) {
    return func2(2);
  }
  return 1;
}

// This is the definition for func2:
int func2(int arg)
{
  if(arg == 2){
    return func1(3);
  }
  return 2;
}


int main()
{
  // Call both functions, just to convince yourself the code works:
  std::cout << func1(1) << std::endl
	    << func2(2) << std::endl;

  return 0;
}
